//
//  SubmitAddressNoTableViewCell.m
//  Youhuiju
//
//  Created by 余尚飞 on 16/8/12.
//  Copyright © 2016年 yutenys. All rights reserved.
//

#import "SubmitAddressNoTableViewCell.h"

@interface SubmitAddressNoTableViewCell ()
@property (weak, nonatomic) IBOutlet UILabel *tipLabel;


//适配
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *imgHig;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *imgWid;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *tipLabelHig;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *imgTop;


@end

@implementation SubmitAddressNoTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    self.imgHig.constant = 29 * FitH;
    self.imgWid.constant = 25 * FitW;
    self.imgTop.constant = 24 * FitH;
    
    self.tipLabelHig.constant = 12 * FitH;
    self.tipLabel.font = [UIFont systemFontOfSize:12 * FitH];
    
    //关键字高亮
    NSString *result = @"还未添加收货地址，去添加";
    NSString *keyWords = @"去添加";
    //关键字标红效果
    NSMutableAttributedString *attributeString = [[NSMutableAttributedString alloc]initWithString:result];
    //获取关键字属性
    NSRange rang = [result rangeOfString:keyWords];
    //设置关键字属性
    [attributeString setAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor colorWithHexString:@"ff5f7b"],NSForegroundColorAttributeName,[UIFont systemFontOfSize:12 * FitH],NSFontAttributeName, nil] range:rang];
    //添加到label
    self.tipLabel.attributedText = attributeString;
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
